package com.dragon.modules.yuegou.model.merchant;

import com.dragon.modules.yuegou.entity.merchant.MerchantDeliveryEntity;
import com.dragon.modules.yuegou.enums.merchant.MerchantDeliveryType;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商户配送信息模型类
 * 
 * @author pbuilder generated
 * @date 2020-03-25 11:24:51
 * @company sgy
 * @version 2.0
 * @see Length 长度限制
 * @see NotNull 对象非空
 * @see NotEmpty 字符串、集合、表、数组非空
 */
public class MerchantDelivery extends MerchantDeliveryEntity {

	private static final long serialVersionUID = 1L;

	/**
	 * 构造一个空商户配送信息模型对象
	 */
	public MerchantDelivery(){
		super();
	}
	
	/**
	 * 依据实体对象的信息构造一个商户配送信息模型对象
	 * 
	 * @param entity 实体对象
	 */
	public MerchantDelivery(MerchantDeliveryEntity entity){
		super(entity);
	}

	/**
	 * 依据其它对象的信息构造一个商户配送信息模型对象
	 * 
	 * @param other 其它对象
	 */
	public MerchantDelivery(MerchantDelivery other){
		super(other);
	}


	@Override
	public String getMerchantId() {
    	return merchantId;
    }

    /**
	 * 设置商户ID
	 * 
	 * @param merchantId 商户ID
	 * @return 当前对象
	 */
    public MerchantDelivery merchantId(String merchantId) {
    	this.merchantId = merchantId;
    	return this;
    }

	@Override
	public String getDaMerchantId() {
    	return daMerchantId;
    }

    /**
	 * 设置配送商户ID
	 * 
	 * @param daMerchantId 配送商户ID
	 * @return 当前对象
	 */
    public MerchantDelivery daMerchantId(String daMerchantId) {
    	this.daMerchantId = daMerchantId;
    	return this;
    }

	@Override
	public String getDaShopId() {
    	return daShopId;
    }

    /**
	 * 设置配送门店ID
	 * 
	 * @param daShopId 配送门店ID
	 * @return 当前对象
	 */
    public MerchantDelivery daShopId(String daShopId) {
    	this.daShopId = daShopId;
    	return this;
    }

	@Override
	public MerchantDeliveryType getType() {
    	return type;
    }

    /**
	 * 设置[枚举]配送类型：0-自主配送-AUTONOMY、1-达达配送-DADA
	 * 
	 * @param type [枚举]配送类型：0-自主配送-AUTONOMY、1-达达配送-DADA
	 * @return 当前对象
	 */
    public MerchantDelivery type(MerchantDeliveryType type) {
    	this.type = type;
    	return this;
    }

	@Override
	public LocalDateTime getCreatedTime() {
    	return createdTime;
    }

    /**
	 * 设置创建时间
	 * 
	 * @param createdTime 创建时间
	 * @return 当前对象
	 */
    public MerchantDelivery createdTime(LocalDateTime createdTime) {
    	this.createdTime = createdTime;
    	return this;
    }

	@Override
	public BigDecimal getFreight() {
    	return freight;
    }

    /**
	 * 设置运费
	 * 
	 * @param freight 运费
	 * @return 当前对象
	 */
    public MerchantDelivery freight(BigDecimal freight) {
    	this.freight = freight;
    	return this;
    }
}
